<%--
  Created by IntelliJ IDEA.
  User: wwy
  Date: 2025/3/5
  Time: 10:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" import="java.util.*"
         isELIgnored="false" %>
<%@ taglib prefix="rapid" uri="http://www.rapid-framework.org.cn/rapid" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<rapid:override name="title">档案管理</rapid:override>

<rapid:override name="head_extend">
    <link href="/static/admin_v1/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <style scoped>
        .archive-page {
            padding: 20px;
            font-family: Arial, sans-serif;
        }
        .module {
            margin-bottom: 30px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
        }
        h2 {
            color: #333;
            margin-bottom: 15px;
        }
        ul {
            list-style: none;
            padding: 0;
        }
        li {
            margin-bottom: 8px;
            line-height: 1.6;
        }
    </style>
</rapid:override>

<rapid:override name="content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>档案管理</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="table_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li><a href="table_basic.html#">选项1</a>
                            </li>
                            <li><a href="table_basic.html#">选项2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input type="text" placeholder="请输入关键词" class="input-sm form-control"> <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-primary"> 搜索</button> </span>
                            </div>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <div class="archive-page">
                            <!-- 教育经历模块 -->
                            <div class="module education-module">
                                <h2>教育经历</h2>
                                <ul v-for="(item, index) in educationList" :key="index">
                                    <li>学校：{{ item.school }}</li>
                                    <li>学历：{{ item.degree }}</li>
                                    <li>专业：{{ item.major }}</li>
                                    <li>时间：{{ item.start_date }} - {{ item.end_date }}</li>
                                    <li>验证状态：{{ item.is_verified ? '已验证' : '未验证' }}</li>
                                </ul>
                            </div>

                            <!-- 工作经历模块 -->
                            <div class="module work-module">
                                <h2>工作经历</h2>
                                <ul v-for="(item, index) in workList" :key="index">
                                    <li>公司：{{ item.company }}</li>
                                    <li>职位：{{ item.position }}</li>
                                    <li>时间：{{ item.start_date }} - {{ item.end_date }}</li>
                                    <li>验证状态：{{ item.is_verified ? '已验证' : '未验证' }}</li>
                                </ul>
                            </div>

                            <!-- 证书模块 -->
                            <div class="module certificate-module">
                                <h2>证书信息</h2>
                                <ul v-for="(item, index) in certificateList" :key="index">
                                    <li>证书名称：{{ item.certificate_name }}</li>
                                    <li>颁发日期：{{ item.issue_date }}</li>
                                    <li>过期日期：{{ item.expiry_date || '无' }}</li>
                                    <li>验证状态：{{ item.is_verified ? '已验证' : '未验证' }}</li>
                                </ul>
                            </div>

                            <!-- 档案变更记录模块 -->
                            <div class="module change-module">
                                <h2>档案变更记录</h2>
                                <ul v-for="(item, index) in changeList" :key="index">
                                    <li>变更字段：{{ item.field_name }}</li>
                                    <li>变更前：{{ item.old_value }}</li>
                                    <li>变更后：{{ item.new_value }}</li>
                                    <li>审批状态：{{ item.approval_status }}</li>
                                </ul>
                            </div>
                        </div>
                    </div>


                </div>
            </div>
        </div>

    </div>
    <script>
        export default {
            data() {
                return {
                    educationList: [], // 教育经历数据
                    workList: [], // 工作经历数据
                    certificateList: [], // 证书数据
                    changeList: [] // 变更记录数据
                };
            },
            mounted() {
                // 模拟获取数据（实际需调用接口）
                // this.fetchData();
            }
        };
    </script>


</rapid:override>

<rapid:override name="js_extend">
    <!-- Bootstrap table -->
    <script src="/static/admin_v1/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/static/admin_v1/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/static/admin_v1/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="/static/admin_v1/js/bootstrap-paginator.js"></script>

    <!-- Peity -->
    <script src="/static/admin_v1/js/demo/bootstrap-table-demo.js"></script>
    <script>
        $(function () {
            $('#pagination').bootstrapPaginator({
                bootstrapMajorVersion: 3,
                currentPage: ${requestScope.pageInfo.pageNum },
                totalPages: ${requestScope.pageInfo.pages },
                pageUrl: function (type, page, current) {
                    return '/admin/user/get.do?pageNum=' + page;
                },
                itemTexts: function (type, page, current) {
                    switch (type) {
                        case "first":
                            return "首页";
                        case "prev":
                            return "上一页";
                        case "next":
                            return "下一页";
                        case "last":
                            return "末页";
                        case "page":
                            return page;
                    }
                }
            });
        });
    </script>
</rapid:override>

<%@include file="/jsp/common/admin/base.jsp" %>
